// pages/events/index.js
Page({
  data: {
    currentIndex: 0,
    loading: false,
    userName: "",
    gender: "男",
  },

  changeTab(e) {
    console.log(e);
    this.setData({
      currentIndex: e.mark.index,
    });
  },

  // 触底
  onEnd() {
    wx.showToast({
      title: "触底了...",
    });
  },

  onRefresh() {
    console.log("加载最新数据");
    setTimeout(() => {
      this.setData({
        loading: false,
      });
    }, 2000);
  },

  onSelectGender(e) {
    console.log(e);
    this.setData({
      gender: e.detail.value,
    });
  },

  onSelectHobby(e) {
    console.log(e);
  },

  onSelectRegion(e) {
    console.log(e);
  },

  onSubmit(e){
    console.log(e);
  }
});
